$(".signupbtn").on('click',function () {
    var username=$(".username").val().trim();
    var email=$(".email").val().trim();
    var realname=$(".realname").val().trim();
    var sex=$(".sex").val().trim();
    var mobile=$(".mobile").val().trim();

    $.ajax({
        type:"post",
        url:"http://localhost:8080/tosignup",
        data:{"username":username,"email":email,"realname":realname,"sex":sex,"mobile":mobile},
        success:function (data) {
            if (data.status==1){
                alert(data.msg);
            }else {
                alert(data.msg);
            }
        },
        fail:function () {
            alert("服务器繁忙");
        },
        complete:function () {
        }
    })
});